package com.laowang.project.pay.config;

/**
 *  微信小程序配置
 */
public class WxConfig {





    public enum WxPayTradeType {
        APP, JSAPI, NATIVE, WAP,MICROPAY,MWEB;
    }

    //public static final String APP_ID = "wxbd9aa9a0b6342bcc";
    //public static final String APP_SECRET = "ed90a8cd0ffb4dd59ace59c5773ec6ea";

    public static final String APP_ID = "wx9173ca5fd436c09b";
    public static final String APP_SECRET = "dce27d4201050a05c2904c901f9ead61";



    public static final String MCH_ID = "152481968"; // 商户号
    public static final String API_KEY = "MIID9TCCAt2gAwIBAgIUZkKGumBVFuHS"; // 就是APIv2密钥
    public static final String grant_url = "https://api.weixin.qq.com/sns/jscode2session";

    // 回调地址
    public static final String NOTIFY_URL = "https://hubeixiangxiang.com/wxApi/wxOrder/wxpay/notify";
    //public static final String NOTIFY_URL = "http://wxcde.free.idcfengye.com/api/wxpay/notify";
    //public static final String NOTIFY_URL = "http://sqnt5z.natappfree.cc/api/wxpay/notify";

    /*public static String getGrantUrl1(String code) {

        StringBuffer url = new StringBuffer();
        url.append(grant_url + "?grant_type=authorization_code&appid=" + APP_ID1);
        url.append("&secret=" + APP_SECRET1);
        url.append("&js_code=" + code);
        return url.toString();
    }*/


    /**
    *@Description: 获取授权链接
    *@Param:
    *@return:
    *@Author: aoion
    *@date: 2020/10/24
    */
    public static String getGrantUrl(String code){
        StringBuffer url = new StringBuffer();
        url.append(grant_url + "?grant_type=authorization_code&appid=" + APP_ID);
        url.append("&secret=" + APP_SECRET);
        url.append("&js_code=" + code);
        return url.toString();
    }



//    public static final String NOTIFY_URL = "https://hotel.bidou88.cn/api/wxpay/notify";

}
